package core.communication.message;

import java.io.Serializable;

import core.communication.Direction;
import core.database.EntityAction;
import core.database.Node;

public class ConfigurationNode implements Serializable {
	private static final long serialVersionUID = 5494247837023211007L;
	
	private EntityAction action = null;
	private String targetNodeUri = null;
	private Node changedNode = null;
	private Direction direction = null;

	// Delete
	// AddParent
	public ConfigurationNode(EntityAction action, String targetNodeUri) {
		this.action = action;
		this.targetNodeUri = targetNodeUri;
	}
	
	// Add
	public ConfigurationNode(EntityAction action, Node node, Direction direction) {
		this.action = action;
		this.changedNode = node;
		this.direction = direction;
	}

	// Edit
	public ConfigurationNode(EntityAction action, String targetNode, Node node) {
		this.action = action;
		this.targetNodeUri = targetNode;
		this.changedNode = node;
	}

	public EntityAction getAction() {
		return action;
	}

	public void setAction(EntityAction action) {
		this.action = action;
	}

	public String getTargetNodeUri() {
		return targetNodeUri;
	}

	public void setTargetNodeUri(String targetNodeUri) {
		this.targetNodeUri = targetNodeUri;
	}

	public Node getChangedNode() {
		return changedNode;
	}

	public void setChangedNode(Node changedNode) {
		this.changedNode = changedNode;
	}

	public Direction getDirection() {
		return direction;
	}

	public void setDirection(Direction direction) {
		this.direction = direction;
	}
}
